home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2009 February
/
PCWFEB09.iso
/
Software
/
Resources
/
Chat & Communication
/
Digsby build 37
/
digsby_setup.exe
/
lib
/
gui
/
snap.pyo
(
.txt
)
< prev
next >
Wrap
Python Compiled Bytecode
|
2008-10-13
|
2KB
|
53 lines
# Source Generated with Decompyle++
# File: in.pyo (Python 2.5)
import wx
from wx import GetMousePosition, Rect, GetTopLevelWindows
from wx import FRAME_SHAPED
from weakref import ref
if 'wxMSW' in wx.PlatformInfo:
from cgui import WindowSnapper as Snapper
else:
class Snapper(object):
def __init__(self, frame, *a, **k):
pass
def SetEnabled(self, val):
pass
def IsEnabled(self):
return False
def SetSnap(win, snapping, filter_func = None):
if not isinstance(snapping, bool):
raise TypeError('SetSnap first argument must be a bool, got type %r' % type(snapping))
try:
snapper = win._snapper
except AttributeError:
snapper = win._snapper = Snapper(win, 12, snapping)
win._snapper.SetEnabled(snapping)
def GetSnap(win):
try:
snapper = win._snapper
except AttributeError:
return False
return snapper.IsEnabled()
import new
wx.TopLevelWindow.GetSnap = new.instancemethod(GetSnap, None, wx.TopLevelWindow)
wx.TopLevelWindow.SetSnap = new.instancemethod(SetSnap, None, wx.TopLevelWindow)
wx.TopLevelWindow.Snap = property(GetSnap, SetSnap)